home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Activation / Focus.h < prev    next >
Text File  |  2000-06-23  |  822b  |  51 lines

  1. // Focus.h
  2.  
  3. #ifndef Focus_h
  4. #define Focus_h
  5.  
  6. #ifndef ListOf_h
  7. #include "ListOf.h"
  8. #endif
  9.  
  10. class Focus
  11.   {
  12.     friend class Activator;
  13.     
  14.     private:
  15.         ListOf< Activator > activators;
  16.         Focus *const parent;
  17.         Focus *favoredChild;
  18.         uint32 children;
  19.         bool active;    
  20.         
  21.         // not implemented:
  22.             Focus( const Focus& );
  23.             void operator=( const Focus& );
  24.  
  25.     protected:
  26.         void Activate();
  27.         void Deactivate();
  28.         
  29.     public:
  30.         Focus();
  31.         Focus( Below, Focus& parent );
  32.         ~Focus();
  33.         
  34.         bool Active() const                    { return active; }
  35.         
  36.         Focus *Parent() const                { return parent; }
  37.         
  38.         Focus *FavoredChild() const        { return favoredChild; }
  39.         void FavorChild( Focus& );
  40.         void FavorNoChild();
  41.         void DisfavorChild( Focus& );
  42.         
  43.         bool Favored() const;
  44.         void BeFavored();
  45.         void BeDisfavored();
  46.         
  47.         static Focus& NeverActive();
  48.   };
  49.  
  50. #endif
  51.